<%@page contentType="text/html" pageEncoding="UTF-8" 
        import="java.io.*,
        java.util.*,
        java.sql.*, 
        javax.sql.*, 
        org.brickred.socialauth.*"%>
<%

    String link = request.getParameter("link");
    String listName = request.getParameter("listName");

    String uid = (String) session.getAttribute("uid");
    if (uid == null || link == null) {
        return;
    }
    if (listName == null) {
        return;
    }

    Connection con = com.elookinto.wordlist.Util.getCon();


    PreparedStatement st = null;
    try {
        st = con.prepareStatement("insert into recordLink ( uid, listname, link, insert_time) values(?,?,?, current_timestamp) ");
    } catch (Exception e) {
        e.printStackTrace();
    }

    st.setString(1, uid);
    st.setString(2, listName);
    st.setString(3, link);
    try {
        st.execute();
    } catch (Exception e) {
        st = con.prepareStatement("update  recordLink set link =?, insert_time = current_timestamp where  uid=? and  listname=? ");
        st.setString(2, uid);
        st.setString(3, listName);
        st.setString(1, link);
        st.execute();
    }

    st.close();

    con.close();



%>
